<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="作业帮手 - 预览和打印您生成的数学作业，包含个性化的练习题和答案。">
    <meta name="keywords" content="作业帮手,数学作业预览,作业打印,数学练习,答案查看">
    <meta name="author" content="作业帮手开发团队">
    <meta name="robots" content="noindex, nofollow">
    <title>作业预览 - 作业帮手</title>
    <link rel="icon" href="{{ url_for('static', filename='images/logo.ico') }}" type="image/x-icon">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/print.css') }}" media="print">
</head>
<body>
    <div class="container preview-page">
        <div class="no-print">
            <h1>预览页面</h1>
            <div class="preview-info">
                <p>难度：{{ difficulty }}</p>
                <p>题目数量：{{ count }}</p>
            </div>
            <button onclick="window.print()">打印作业</button>
            <a href="{{ url_for('index') }}" class="back-btn">返回修改</a>
        </div>

        <div class="print-content font-{{ font_size }} spacing-{{ line_spacing }}">
            <h2>数学练习题</h2>
            
            {% if show_student_info %}
            <div class="student-info">
                <span class="student-info-item">{{ name_label }}________</span>
                <span class="student-info-item">{{ class_label }}________</span>
                <span class="student-info-item">{{ date_label }}________</span>
            </div>
            {% endif %}
            
            <div class="questions layout-{{ layout }}">
                {% for question in questions %}
                <div class="question-item">
                    {{ loop.index }}. {{ question }}
                </div>
                {% endfor %}
            </div>

            <div class="answers no-print">
                <h3>答案：</h3>
                {% for answer in answers %}
                <div class="answer-item">
                    {{ loop.index }}. {{ answer }}
                </div>
                {% endfor %}
            </div>
        </div>
    </div>
</body>
</html>
